package com.task.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.task.entity.dto.DeleteDTO;
import com.task.entity.po.*;
import com.task.entity.vo.HomeCategoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommonMapper {



    List<HomeCategoryVO> listIndex();

    HomeCategoryVO queryById(@Param("id") Long id);

    String queryType(@Param("area") String area);

    List<HomeCategoryVO> recommendList();

    void insertUser(UserPO po);

    UserPO queryByUserName(@Param("username") String username);

    void insertTrip(TripPO tripPO);

    List<TripPO> listTrip(@Param("userId")Long userId,
    @Param("type") Integer type);

    void deleteTrip(@Param("sceneryId") Long sceneryId,@Param("userId") Long userId);

    void updateEndTrp(@Param("sceneryId") Long sceneryId,@Param("userId") Long userId);

    void insertTravel(TravelPO travelPO);

    List<TravelPO> listTravel(@Param("type") String type);

    void insertTravelCollect(CollectPO collectPO);

    List<TravelPO> listTravelAll(@Param("userId") String userId);

    List<TravelPO> listCollect(String userId);

    UserPO getUserInfo(@Param("userId") String userId);

    TripPO queryTripByUserIdAndScenery(Long userId, Long sceneryId);

    List<AdvicePO> listAdvice();

    void deleteTravel(DeleteDTO dto);

    void deleteTravelCollect(DeleteDTO dto);
}
